<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<a href="http://www.baidu.com">我要跳向百度</a>
<form action="/" method="post">
    <input type="checkbox" name="person" value="sex">
    <input type="checkbox" name="person" value="name">
    <input type="checkbox" name="person" value="age">
    <select>
        <option value="1">1</option>
        <option value="2">2</option>
    </select>
    <input type="submit" value="提交">
    <input type="reset" value="重置">
</form>
</body>
</html>
<script>
    document.querySelector('a').addEventListener('click',function(e){
        e.preventDefault();
        //location.href = 'http://www.baidu.com';
    })
    document.querySelector('form').addEventListener('click',function(e){
        e.preventDefault();
    })
    //人家不是默认行为
    document.querySelector('select').addEventListener('click',function(e){
        e.preventDefault();
    })

</script>